Equational Reasoning with Subtypes
نویسندگان
چکیده
Using equational logic as a specification language, we investigate the proof theory of behavioral subtyping for object-oriented abstract data types with immutable objects and deterministic methods that can use multiple dispatch. In particular, we investigate a proof technique for correct behavioral subtyping in which each subtype’s specification includes terms that can be used to coerce its objects to objects of each of its supertypes. We show that this technique is sound, using our previous work on the model theory of such abstract data types. We also give an example to show that the technique is not complete, even if the methods do not use multiple dispatch, and even if types specified are term-generated. In preparation for the results on equational subtyping we develop the proof theory of a richer form of equational logic that is suitable for dealing with subtyping and behavioral equivalence. This gives some insight into question of when our proof techniques can be make effectively computable, but in general behavioral consequence is not effectively computable.
منابع مشابه
Term Equational Systems and Logics
We introduce an abstract general notion of system of equations between terms, called Term Equational System, and develop a sound logical deduction system, called Term Equational Logic, for equational reasoning. Further, we give an analysis of algebraic free constructions that together with an internal completeness result may be used to synthesise complete equational logics. Indeed, as an applic...
متن کاملThe Technology Behind a Graphical User Interface for an Equational Reasoning Assistant
The Haskell Equational Reasoning Assistant (HERA) is an application written in Haskell that helps users construct and present equational reasoning style proofs[1]. In this paper we discuss the technology behind the user interface.
متن کاملEquational Reasoning for Prolog
Equational Reasoning is a feature of Functional Programming much envied by Logic Programmers. We argue that logic programmers should not shy away from adopting equational reasoning because of perceived pitfalls, but rather embrace it to indulge in its many benefits. We propose and illustrate two approaches: a cumbersome indirection via Haskell and a more insightful approach directly in Prolog.
متن کاملUnity in nominal equational reasoning: The algebra of equality on nominal sets
There are currently no fewer than four dedicated logics for equality reasoning over nominal sets: nominal algebra, nominal equational logic, nominal equational logic with equality only, and permissive-nominal algebra. In this survey and research paper we present these logics side-by-side in a common notation, survey their similarities and differences, discuss their proofand model-theories, and ...
متن کاملSound and Complete Equational Reasoning over Comodels
Comodels of Lawvere theories, i.e. models in Set , model state spaces with algebraic access operations. Standard equational reasoning is known to be sound but incomplete for comodels. We give two sound and complete calculi for equational reasoning over comodels: an inductive calculus for equality-on-the-nose, and a coinductive/inductive calculus for equality modulo bisimulation which captures b...
متن کامل